import React, { Component } from 'react'
import Hello from './components/Hello'

export default class LayOut extends Component {
  username = 'lakers '
  changeUsername = () => {
    this.forceUpdate()
    this.username = '兵哥'
  }
  componentDidUpdate (prevProps, prevState) {
    console.log('componentDidUpdate')
  }
  render () {
    return (
      <div>
        <button onClick={this.changeUsername}>修改</button>
        <p>{this.username}</p>
      </div>
    )
  }
}
